home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / zgelsx.z / zgelsx
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. ZZZZGGGGEEEELLLLSSSSXXXX((((3333FFFF))))                                                          ZZZZGGGGEEEELLLLSSSSXXXX((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ZGELSX - compute the minimum-norm solution to a complex linear least
  10.      squares problem
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE ZGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK,
  14.                         RWORK, INFO )
  15.  
  16.          INTEGER        INFO, LDA, LDB, M, N, NRHS, RANK
  17.  
  18.          DOUBLE         PRECISION RCOND
  19.  
  20.          INTEGER        JPVT( * )
  21.  
  22.          DOUBLE         PRECISION RWORK( * )
  23.  
  24.          COMPLEX*16     A( LDA, * ), B( LDB, * ), WORK( * )
  25.  
  26. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  27.      ZGELSX computes the minimum-norm solution to a complex linear least
  28.      squares problem:
  29.          minimize || A * X - B ||
  30.      using a complete orthogonal factorization of A.  A is an M-by-N matrix
  31.      which may be rank-deficient.
  32.  
  33.      Several right hand side vectors b and solution vectors x can be handled
  34.      in a single call; they are stored as the columns of the M-by-NRHS right
  35.      hand side matrix B and the N-by-NRHS solution matrix X.
  36.  
  37.      The routine first computes a QR factorization with column pivoting:
  38.          A * P = Q * [ R11 R12 ]
  39.                      [  0  R22 ]
  40.      with R11 defined as the largest leading submatrix whose estimated
  41.      condition number is less than 1/RCOND.  The order of R11, RANK, is the
  42.      effective rank of A.
  43.  
  44.      Then, R22 is considered to be negligible, and R12 is annihilated by
  45.      unitary transformations from the right, arriving at the complete
  46.      orthogonal factorization:
  47.         A * P = Q * [ T11 0 ] * Z
  48.                     [  0  0 ]
  49.      The minimum-norm solution is then
  50.         X = P * Z' [ inv(T11)*Q1'*B ]
  51.                    [        0       ]
  52.      where Q1 consists of the first RANK columns of Q.
  53.  
  54.  
  55. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  56.      M       (input) INTEGER
  57.              The number of rows of the matrix A.  M >= 0.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ZZZZGGGGEEEELLLLSSSSXXXX((((3333FFFF))))                                                          ZZZZGGGGEEEELLLLSSSSXXXX((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      N       (input) INTEGER
  75.              The number of columns of the matrix A.  N >= 0.
  76.  
  77.      NRHS    (input) INTEGER
  78.              The number of right hand sides, i.e., the number of columns of
  79.              matrices B and X. NRHS >= 0.
  80.  
  81.      A       (input/output) COMPLEX*16 array, dimension (LDA,N)
  82.              On entry, the M-by-N matrix A.  On exit, A has been overwritten
  83.              by details of its complete orthogonal factorization.
  84.  
  85.      LDA     (input) INTEGER
  86.              The leading dimension of the array A.  LDA >= max(1,M).
  87.  
  88.      B       (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
  89.              On entry, the M-by-NRHS right hand side matrix B.  On exit, the
  90.              N-by-NRHS solution matrix X.  If m >= n and RANK = n, the
  91.              residual sum-of-squares for the solution in the i-th column is
  92.              given by the sum of squares of elements N+1:M in that column.
  93.  
  94.      LDB     (input) INTEGER
  95.              The leading dimension of the array B. LDB >= max(1,M,N).
  96.  
  97.      JPVT    (input/output) INTEGER array, dimension (N)
  98.              On entry, if JPVT(i) .ne. 0, the i-th column of A is an initial
  99.              column, otherwise it is a free column.  Before the QR
  100.              factorization of A, all initial columns are permuted to the
  101.              leading positions; only the remaining free columns are moved as a
  102.              result of column pivoting during the factorization.  On exit, if
  103.              JPVT(i) = k, then the i-th column of A*P was the k-th column of
  104.              A.
  105.  
  106.      RCOND   (input) DOUBLE PRECISION
  107.              RCOND is used to determine the effective rank of A, which is
  108.              defined as the order of the largest leading triangular submatrix
  109.              R11 in the QR factorization with pivoting of A, whose estimated
  110.              condition number < 1/RCOND.
  111.  
  112.      RANK    (output) INTEGER
  113.              The effective rank of A, i.e., the order of the submatrix R11.
  114.              This is the same as the order of the submatrix T11 in the
  115.              complete orthogonal factorization of A.
  116.  
  117.      WORK    (workspace) COMPLEX*16 array, dimension
  118.              (min(M,N) + max( N, 2*min(M,N)+NRHS )),
  119.  
  120.      RWORK   (workspace) DOUBLE PRECISION array, dimension (2*N)
  121.  
  122.      INFO    (output) INTEGER
  123.              = 0:  successful exit
  124.              < 0:  if INFO = -i, the i-th argument had an illegal value
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.